﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace STKMIS.Model
{
    /// <summary>
    /// 产品的实体类
    /// </summary>
    [Serializable]
    public class ProductModel
    {
        // 常量
        public const string tableName = "Product";
        public const string primaryKeyName = "ProductID";

        // 成员变量
        private int _productID;
        private string _productName;
        private string _productCode;
        private string _productNamepY;
        private int _productTypeID;
        private string _productStandard;
        private string _productRemark;
        private Boolean _isDeleted;

        /// <summary>
        /// 字段名结构
        /// <summary>
        public struct FieldName
        {
            public const string productID = "ProductID";
            public const string productName = "ProductName";
            public const string productCode = "ProductCode";
            public const string productNamepY = "ProductNamePY";
            public const string productTypeID = "ProductTypeID";
            public const string productStandard = "ProductStandard";
            public const string productRemark = "ProductRemark";
            public const string isDeleted = "IsDeleted";
        }

        /// <summary>
        /// 默认构造函数
        /// <summary>
        public ProductModel() { }

        /// <summary>
        /// 带参构造函数
        /// <summary>
        ///<param name="productID">产品主键ID</param>
        ///<param name="productName">产品名称</param>
        ///<param name="productNamepY">产品名称拼音</param>
        ///<param name="productTypeID">产品类型ID</param>
        ///<param name="productStandard">产品规格(标准)</param>
        ///<param name="productRemark">备注</param>
        ///<param name="isDeleted">是否已删除</param>
        public ProductModel(int productID, string productName,string productCode, string productNamepY, int productTypeID, string productStandard, string productRemark, Boolean isDeleted)
        {
            this._productID = productID;
            this._productName = productName;
            this._productCode = productCode;
            this._productNamepY = productNamepY;
            this._productTypeID = productTypeID;
            this._productStandard = productStandard;
            this._productRemark = productRemark;
            this._isDeleted = isDeleted;
        }

        /// <summary>
        /// 产品主键ID
        /// <summary>
        public int ProductID
        { 
            get { return _productID; }
            set { _productID = value; }
        }

        /// <summary>
        /// 产品名称
        /// <summary>
        public string ProductName
        { 
            get { return _productName; }
            set { _productName = value; }
        }
        /// <summary>
        /// 产品编码
        /// </summary>
        public string ProductCode
        {
            get { return _productCode; }
            set { _productCode = value; }
        }

        /// <summary>
        /// 产品名称拼音
        /// <summary>
        public string ProductNamePY
        { 
            get { return _productNamepY; }
            set { _productNamepY = value; }
        }

        /// <summary>
        /// 产品类型ID
        /// <summary>
        public int ProductTypeID
        { 
            get { return _productTypeID; }
            set { _productTypeID = value; }
        }

        /// <summary>
        /// 产品规格(标准)
        /// <summary>
        public string ProductStandard
        { 
            get { return _productStandard; }
            set { _productStandard = value; }
        }

        /// <summary>
        /// 备注
        /// <summary>
        public string ProductRemark
        { 
            get { return _productRemark; }
            set { _productRemark = value; }
        }

        /// <summary>
        /// 是否已删除
        /// <summary>
        public Boolean IsDeleted
        { 
            get { return _isDeleted; }
            set { _isDeleted = value; }
        }
    }
}
